<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="common/common_head :: commonHeader('组织机构选择')"/>
</head>

<body class="gray-bg">

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>组织机构</h5>
                </div>
                <div class="ibox-content">
                    <ul id="deptTree" class="ztree" style="background-color: inherit;margin: 0;border: 0;"></ul>
                </div>
            </div>
        </div>
    </div>
</div>

<!--引入公共js-->
<div th:include="common/onload_js :: onloadJS"></div>

<script type="text/javascript">
    $(function () {
        tree=ZTree.init('deptTree', ctxPath+ "/sys/dept/select", {
            clickTree: function (treeId, treeNode, clickFlag) {
                parent.toDeptId(treeNode);
                Dialog.closeFrame(window.name);
            },
            data: {
                key: {
                    name: "name"
                },
                simpleData: {
                    enable: true,
                    idKey: "deptId",
                    pIdKey: "parentId",
                    rootPId: null
                }
            },check: {
                enable: false
            }
        });
    });

</script>

</body>
</html>
